package com.github.slprj.slake.net;

import java.util.HashMap;

/**
 * NioWorker 参数封装
 *
 * @author YangXiaoLong
 * @date 2022/8/26 17:37
 */
public class WorkerParams {
    private RpcPbCallback callback;
    private IoQueue ioQueue;
    private Runnable wakeupRunnable;
    private HashMap<Long, WriteData> pendingRequests;
    private ByteBufferPool pool;

    public WorkerParams() {
    }

    public RpcPbCallback getCallback() {
        return callback;
    }

    public void setCallback(RpcPbCallback callback) {
        this.callback = callback;
    }

    public IoQueue getIoQueue() {
        return ioQueue;
    }

    public void setIoQueue(IoQueue ioQueue) {
        this.ioQueue = ioQueue;
    }

    public Runnable getWakeupRunnable() {
        return wakeupRunnable;
    }

    public void setWakeupRunnable(Runnable wakeupRunnable) {
        this.wakeupRunnable = wakeupRunnable;
    }

    public HashMap<Long, WriteData> getPendingRequests() {
        return pendingRequests;
    }

    public void setPendingRequests(HashMap<Long, WriteData> pendingRequests) {
        this.pendingRequests = pendingRequests;
    }

    public ByteBufferPool getPool() {
        return pool;
    }

    public void setPool(ByteBufferPool pool) {
        this.pool = pool;
    }
}
